package com.ms.dsq_english.utils

import java.math.BigDecimal

/**
 *
 * @Description:
 * @Author:         zheng
 */
class NumUtils {
    fun divide(valueOne: Int, valueTwo: Int, scale: Int): Double {

        val b1 = BigDecimal(java.lang.Double.toString(valueOne.toDouble()))
        val b2 = BigDecimal(java.lang.Double.toString(valueTwo.toDouble()))
        return b1.divide(b2, scale, BigDecimal.ROUND_HALF_UP).toDouble()
    }
}